//
//  NYTagLabel.m
//  百思不得姐
//
//  Created by Apple on 15/8/26.
//  Copyright (c) 2015年 Neal. All rights reserved.
//

#import "NYTagLabel.h"

@implementation NYTagLabel

- (instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame]) {
        self.textColor = [UIColor whiteColor];
        self.font = [UIFont systemFontOfSize:15];
        self.backgroundColor =NYTagBgColor;
        self.textAlignment = NSTextAlignmentCenter;
    }
    return self;
}
- (void)setText:(NSString *)text
{
    [super setText:text];
    [self sizeToFit];
    
    self.width += 2 *SmallMargin;
    self.height = NYtagButtonHeight;
}
@end
